<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset="utf-8">
<title>任务执行占比</title>
<@fm.header />
<script>
function doSearch(){   
	var startTime = $('#startTime').datetimebox('getValue');
	var endTime = $('#endTime').datetimebox('getValue');
	
	if (startTime == "" && endTime != "") {
		$.messager.alert(market.content.title, "请选择开始时间！");
		return;
	}
 
    $('#tt').datagrid('load', {    
        mark: $('#mark').val(),
        startTime: startTime,
        endTime: endTime,
        taskType: $('#taskType').combobox('getValue')
    });
}

function formatTask(value,row,index){
	if (value == 1) {
		return '新增';
	} 
	if (value == 2) {
		return '留存';
	}
}


</script>
</head>
<body class="cmp-list-body">
<div id="tb" style="padding:3px">
    <span>Mark:</span>
    <input id="mark" style="line-height:20px;border:1px solid #ccc">
    
    <span>任务类型:</span>
    <select class="easyui-combobox" id="taskType" panelHeight="auto" style="width:155px" >
    	<option value="" >全部</option>
        <option value="1" >新增</option>
    	<option value="2" >留存</option>
    </select>
    
    <span>时间:</span>
    <input type="text" class="easyui-datebox" id="startTime" />至
    <input type="text" class="easyui-datebox" id="endTime" />
    
    <a href="#" class="easyui-linkbutton" iconCls="icon-search" plain="true" onclick="doSearch();">查询</a> 
</div>
<table id="tt" class="easyui-datagrid" title="任务执行占比" iconCls="icon-save" 
	url="/taskRate/listJson" toolbar="#tb" rownumbers="true" idField="id"
	singleSelect="true" pagination="true" fitColumns="true" pageSize="15" pageList="[15,30,60,80,100]"> 
    <thead>
        <tr>
            <th align="center" width="35%" field="mark">Mark</th>
            <th align="center" width="10%" field="taskType" formatter="formatTask">任务类型</th>
            <th align="center" width="15%" field="day">时间</th>
            <th align="center" width="10%" field="totalNum">总下发量</th>
            <th align="center" width="10%" field="newNum" >新增执行量</th>
            <th align="center" width="10%" field="reNum" >留存执行量</th>
        </tr>
    </thead>   
</table>
</body>
</html>